package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 打印沙漏
 */
public class _002 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        int N = Integer.valueOf(s[0]);
        int sum =1;
        int temp =1;
        int pre = 1;
        int h=1;

        if (N ==1){
            System.out.println(s[1]);
        }
        while (sum<=N){
            pre=sum;
            sum+=(temp+2)*2;
            temp=temp+2;
            h++;
        }
        if (pre!=N){
            temp=temp-2;
        }
        int k = temp;
        while (k>=1){
            for (int i=0;i<(temp-k)/2;i++){
                System.out.print(" ");
            }
            for (int j=0;j<k;j++){
                System.out.print(s[1]);
            }

            k=k-2;
            System.out.println();
        }
        int l=3;
        while (l<=temp){
            for (int i=0;i<(temp-l)/2;i++){
                System.out.print(" ");
            }
            for (int i=0;i<l;i++){
                System.out.print(s[1]);
            }
            l=l+2;
            System.out.println();
        }
        if ((N-pre)!=0)
            System.out.println(N-pre);
    }
}
